home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / parser.jar / com / sun / xml / parser / XmlReader$BaseReader.class (.txt) < prev    next >
Encoding:
Java Class File  |  2000-02-23  |  839 b   |  33 lines

  1. package com.sun.xml.parser;
  2.  
  3. import java.io.IOException;
  4. import java.io.InputStream;
  5. import java.io.Reader;
  6.  
  7. abstract class XmlReader$BaseReader extends Reader {
  8.    protected InputStream instream;
  9.    protected byte[] buffer;
  10.    protected int start;
  11.    protected int finish;
  12.  
  13.    XmlReader$BaseReader(InputStream var1) {
  14.       super(var1);
  15.       this.instream = var1;
  16.       this.buffer = new byte[8192];
  17.    }
  18.  
  19.    public void close() throws IOException {
  20.       if (this.instream != null) {
  21.          this.instream.close();
  22.          this.start = this.finish = 0;
  23.          this.buffer = null;
  24.          this.instream = null;
  25.       }
  26.  
  27.    }
  28.  
  29.    public boolean ready() throws IOException {
  30.       return this.instream == null || this.finish - this.start > 0 || this.instream.available() != 0;
  31.    }
  32. }
  33.